package com.xinjian.jianba.examples;

import org.apache.commons.lang.StringUtils;

public class test {
public static void main(String[] args) {
	String str="master:192.168.1.12";
	if (StringUtils.isNotBlank(str)) {
		String[] num=str.split(",");
		for(String number:num){
        String[] hostAndPort = StringUtils.split(number,":",3);
        System.out.println(hostAndPort.length);
        for(String re:hostAndPort){
        	System.out.println(re);
        }
		}
	}
}
}
